import re
from day_log import cuslog

phone = "2004-959-559 # 这是一个电话号码"

# # 删除注释
# num = re.sub(r'#.*$', "", phone)
# print("电话号码 : ", num)
#
# # 移除非数字的内容
# num = re.sub(r'\D', "", phone)
# print("电话号码 : ", num)

def double(matched):
    value = int(matched.group('value'))
    return str(value * 2)


s = 'A23G4HFD567'
print(re.sub(r'(?P<value>\d+)', double, s)
def print_log():
    cuslog.Log_info(re.sub(r'(?P<value>\d+)', double, s))

print_log()
